package com.wjh.controler;

import com.wjh.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class UserControl3 {
    @RequestMapping("/getuser")
    public ModelAndView getuser(){
        ModelAndView modelAndView = new ModelAndView();
        User user=new User();
        user.setMobile("45842");
        user.setUsername("金刚羊");
        modelAndView.setViewName("index");
        modelAndView.addObject(user);
        return modelAndView;
    }
}
